/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Administrador
 */
@Embeddable
public class ComisionPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "idCategoria")
    private int idCategoria;
    @Basic(optional = false)
    @Column(name = "idComision")
    private int idComision;

    public ComisionPK() {
    }

    public ComisionPK(int idCategoria, int idComision) {
        this.idCategoria = idCategoria;
        this.idComision = idComision;
    }

    public int getIdCategoria() {
        return idCategoria;
    }

    public void setIdCategoria(int idCategoria) {
        this.idCategoria = idCategoria;
    }

    public int getIdComision() {
        return idComision;
    }

    public void setIdComision(int idComision) {
        this.idComision = idComision;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idCategoria;
        hash += (int) idComision;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ComisionPK)) {
            return false;
        }
        ComisionPK other = (ComisionPK) object;
        if (this.idCategoria != other.idCategoria) {
            return false;
        }
        if (this.idComision != other.idComision) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.ComisionPK[ idCategoria=" + idCategoria + ", idComision=" + idComision + " ]";
    }
    
}
